package com.ls.aop.jdk;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class StaticProxy implements Subject{
	private Logger logger = LoggerFactory.getLogger(this.getClass());
	private Subject subject;
	public StaticProxy(Subject subject) {
		this.subject=subject;
	}
	
	
	@Override
	public void m1() {
		logger.info(" in StaticProxy before m1 ");
		subject.m1();
	}

	@Override
	public void m2() {
		logger.info(" in StaticProxy before m2 "); //每个方法都定义
		subject.m2();
		
	}

}
